import request from '@/server'

// 获得问题列表
export function getProblemListApi(page: number, size = 5) {
  return request.get({
    url: `/admin/upkeep/getQuestionListAdmin?page=${page}&size=${size}`
  })
}

// 删除问题列表
export function deleteProblemApi(id: number) {
  return request.delete({
    url: `/admin/upkeep/deleteQuestion?id=${id}`
  })
}

// 修改问题列表
export function updateProblemApi(data: any) {
  return request.post({
    url: `/admin/upkeep/updateQuestion`,
    data
  })
}

// 新增问题列表
export function addProblemApi(data: any) {
  return request.post({
    url: `/admin/upkeep/addQuestion`,
    data
  })
}
